#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
#define min(a,b)  ((a)<(b)?(a):(b))
#define INF 0x1f1f1f1f
#define MAXN 40000
using namespace std;
int p[MAXN],cont[50];
bool flag[MAXN];
int k,num;
void get_prime(){
	memset(flag,false,sizeof(flag));
	k = 0;
	for(int i = 2;i < MAXN; ++i){
		if(!flag[i])
			p[k++] = i;
		for(int j = 0;j < k && i*p[j] < MAXN; ++j){
			flag[i*p[j]] = true;
			if(i % p[j] == 0) break;
		}
	}
}
bool cal(int n){
	num = 0;
	for(int i = 0;p[i] <= n && i < k; ++i){
		if(n%p[i] == 0){
			while(n%p[i] == 0)
				n /= p[i];
			num++;
			if(num > 1) return false;
		}
		if(n == 1) break;
	}
	if(n > 1) num++;
	if(num > 1) return false;
	return true;
}


int main()
{
	int n;
	get_prime();
	while(scanf("%d",&n) != EOF){
		if(n != 4 && n % 4 == 0){
			printf("1/n");
			continue;
		}
		if(n%2 == 0){
			if(cal(n/2)){
				printf("%d/n",n-1);
				continue;
			}else{
				printf("1/n");
				continue;
			}
		}else{
			if(cal(n)){
				printf("%d/n",n-1);
				continue;
			}else{
				printf("1/n");
				continue;
			}
		}
	}
}
